package com.whfc.emp.dao;


import com.whfc.emp.entity.ApprovalRecord;
import com.whfc.entity.dto.Apply.rep.EntryAuditRep;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ApprovalRecordMapper {

    int insertApprovalRecord(ApprovalRecord approvalRecord);

    ApprovalRecord getApprovalRecordById(Integer id);

    int updateApprovalRecord(ApprovalRecord approvalRecord);

    int deleteApprovalRecordById(Integer id);

    List<EntryAuditRep> entryReview(@Param("deptId") List<Integer> deptId, @Param("userId") Integer userId);

    List<ApprovalRecord> getParentNode(Integer approverType,Integer applicationId);

    List<ApprovalRecord> selectByApplyIdAndAuditType(@Param("applicationId") Integer applicationId,@Param("reviewType") Integer reviewType);

    List<ApprovalRecord> selectRecordByApplyIdAndAuditType(@Param("applicationId") Integer applicationId,@Param("reviewType") Integer reviewType);

    ApprovalRecord getByApplicationIdAndApproverId(@Param("applicationId") Integer applicationId,@Param("approverId") Integer approverId);

    List<ApprovalRecord> selectByApproverId(@Param("approverId") Integer approverId);
}